local skel = fk.CreateSkill {
  name = "emo__baogui",
  tags = {Skill.Compulsory},
}

Fk:loadTranslationTable{
  ["emo__baogui"] = "暴鬼",
  [":emo__baogui"] = "锁定技，每名角色【杀】次数上限+1。若你未受伤，你使用和受到【杀】伤害+1。",
}

skel:addEffect(fk.CardUsing, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(skel.name) and not player:isWounded() and data.card and data.card.trueName == "slash"
  end,
  on_use = function(self, event, target, player, data)
    data.additionalDamage = (data.additionalDamage or 0) + 1
  end
})

skel:addEffect(fk.DamageInflicted, {
  anim_type = "negative",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(skel.name) and not player:isWounded() and data.card and data.card.trueName == "slash"
  end,
  on_use = function(self, event, target, player, data)
    data:changeDamage(1)
  end
})

skel:addEffect("targetmod", {
  residue_func = function(self, player, skill, scope, card)
    if card and card.trueName == "slash" then
      return #table.filter(Fk:currentRoom().alive_players, function (p) return p:hasSkill(skel.name) end)
    end
  end,
})

return skel
